`);w.document.close()} const INVCSS=`.inv{max-width:760px;margin:auto;font-size:14px}.inv .row{display:flex;justify-content:space-between;gap:12px}.g2i{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0;padding:14px;border:1px solid #e6dfd3;border-radius:12px}.g2i small{display:block;color:#8a8175;font-weight:700;font-size:11px;margin-bottom:4px}.g2i b{display:block}.it{width:100%;border-collapse:collapse}.it th{text-align:left;font-size:11px;color:#8a8175;border-bottom:1.5px solid #e6dfd3;padding:6px}.it td{padding:7px 6px;border-bottom:1px solid #eee}.itot{margin-left:auto;max-width:300px;margin-top:10px}.itot div{display:flex;justify-content:space-between;padding:4px 0}.itot .gt{border-top:1.5px solid #16130f;margin-top:4px;padding-top:8px;font-size:16px}.meta{color:#8a8175;font-size:12px}`; function billView(i){const bl=DB.bills[i],adm=ME.role==="admin"; openM(`
${bl.mode==="generated"?invHTML(bl):`

Bill ${bl.no||""}

${provOf(bl.by)?.name} · Booking ${bl.b} · ${bl.mode==="khata"?"Made on Khata Express":"Own bill"} · Amount ${inr(bl.amt||0)}

${/^data:image/.test(bl.file)?``:`Download ${bl.fname||"PDF"}`}`}
${billChip(bl)}
${bl.mode==="generated"?``:""}${adm&&bl.st==="Sent"?``:""}
${bl.why?`
Admin note: ${bl.why}
`:""}
`)} const billChip=bl=>!bl?'Not sent':`${bl.st==="Sent"?"Sent to admin":bl.st}`; function billSt(i,st){const bl=DB.bills[i];if(st==="Rejected"){const w=prompt("Reason for rejecting (the vendor will see this):","");if(w===null)return;bl.why=w}else bl.why="";bl.st=st;bl.tSt=Date.now();save();closeM();toast("Bill "+st.toLowerCase());render()} function billForm(bid,id){const b=DB.bookings.find(x=>x.id===bid),t=taxOf(id),old=billOf(bid,id),c=invCalc(b,id,t.reg),k=S("khata.url"); openM(`
${b.id}

Bill for this shoot

${provOf(id).name} · billing ${inr(c.sub)}${t.reg?` + GST ${inr(c.gst)}`:""}. Choose one way to send your bill to BrandShot.

1. Use the bill we made for you

A ${t.reg?"GST tax invoice":"bill of supply"} with all your items from this booking. Check it, then confirm and send.

${t.reg&&!t.gstin?`
Add your GSTIN in your billing details below before sending.
`:""}
2. Attach your own bill

Made in another app (Tally, Vyapar, Zoho and so on). Photo or PDF, up to 1 MB.

${k?`
3. Make it on Khata Express

${S("khata.note")}

${S("khata.label")} ↗
`:""}
Your billing details (used on every bill)
`)} function saveTax(id,o){const p=provOf(id);p.tax=Object.assign(taxOf(id),o);save()} function billPreview(bid,id){openM(`
${invHTML({b:bid,by:id,no:$("bino").value||invNo(id),date:Date.now(),tax:taxOf(id)})}
`)} function billPut(o){DB.bills=DB.bills||[];const i=DB.bills.findIndex(x=>x.b===o.b&&x.by===o.by);if(i>-1&&DB.bills[i].st==="Approved")return toast("This bill is already approved");o.id=i>-1?DB.bills[i].id:"vb"+Date.now();i>-1?DB.bills[i]=o:DB.bills.unshift(o);save();closeM();toast("Bill sent to admin");render()} function billSend(bid,id,mode){const t=taxOf(id);if(t.reg&&!t.gstin)return toast("Please add your GSTIN first (billing details below)");const no=$("bino").value.trim()||invNo(id),b=DB.bookings.find(x=>x.id===bid); billPut({b:bid,by:id,mode,no,date:Date.now(),tax:t,amt:invCalc(b,id,t.reg).tot,st:"Sent",t:Date.now()})} function billAttach(bid,id,f,mode){if(!f)return;const no=$("bano")?.value.trim()||"",amt=+($("baamt")?.value||0); const done=file=>billPut({b:bid,by:id,mode,no,amt,file,fname:f.name,date:Date.now(),st:"Sent",t:Date.now()}); if(/^image\//.test(f.type)){const r=new FileReader();r.onload=e=>{const im=new Image();im.onload=()=>{const c=document.createElement("canvas"),s=Math.min(1,1600/Math.max(im.width,im.height));c.width=im.width*s;c.height=im.height*s;c.getContext("2d").drawImage(im,0,0,c.width,c.height);done(c.toDataURL("image/jpeg",.8))};im.src=e.target.result};r.readAsDataURL(f)} else{if(f.size>1e6)return toast("PDF is too large. Please keep it under 1 MB");const r=new FileReader();r.onload=e=>done(e.target.result);r.readAsDataURL(f)}} function billsTab(){const L=myListings(),ids=L.map(x=>x.id),J=billJobs(ids); return `

Bills

After a shoot is completed, your bill is ready here with GST. Confirm and send it to BrandShot, or attach your own bill.

${J.length?`
${J.map(({b,id})=>{const bl=billOf(b.id,id),t=taxOf(id),c=invCalc(b,id,t.reg),i=(DB.bills||[]).indexOf(bl); return ``}).join("")}
BookingShootYour billingBill
${b.id}
${b.partyName}${L.length>1?" · "+provOf(id).name:""}
${tn(b)}
${fmtD(b.date)}
${inr(c.tot)}${t.reg?'
incl. GST
':""}
${billChip(bl)}${bl?.why?`
${bl.why}
`:""}
${bl?` `:""}${!bl||bl.st==="Rejected"?``:""}
`:'
Bills appear here once a shoot is completed.
'}
`} let VBF="Sent"; function vbillsAdmin(){const A=DB.bills||[],F={"Sent":x=>x.st==="Sent",Approved:x=>x.st==="Approved",Rejected:x=>x.st==="Rejected",All:()=>1},L=A.filter(F[VBF]),pend=billJobs(DB.bookings.flatMap(teamOf)).filter(j=>!billOf(j.b.id,j.id)); return `

Vendor bills

Bills from models, photographers, creators, studios and shoot-set providers for completed shoots.

${Object.keys(F).map(k=>``).join("")}
${L.length?`
${L.map(bl=>{const i=A.indexOf(bl);return ``}).join("")}
VendorBookingBillAmountStatus
${provOf(bl.by)?.name||bl.by}
${RC[kindOf(bl.by)]?.[1]||""}
${bl.b}${bl.no||"-"}
${{generated:"BrandShot invoice",own:"Own bill attached",khata:"Khata Express"}[bl.mode]}
${inr(bl.amt||0)}${billChip(bl)}
`:'
Nothing here
'} ${pend.length?`

${pend.length} completed job${pend.length>1?"s are":" is"} still waiting for a vendor bill.

`:""}
`} /* ---- reallocation & notices ---- */ function cantMake(bid,id,fee){const b=DB.bookings.find(x=>x.id===bid),p=provOf(id);if(fee&&cxlFee(false))(b.cxls=b.cxls||[]).push({who:id,fee:cxlFee(false),t:Date.now()});LEDG=null;logB(b,"can't make it, so it needs reallocation",p.name);(b.issues=b.issues||[]).push({who:id,open:true}); (b.notices=b.notices||[]).push({open:true,text:`${p.name} can't make it on ${fmtD(b.date)}. We'll allot the best available option to your order, or you can cancel your booking.`});save();toast("Admin and party have been informed");render()} function altsFor(b,id){const k=kindOf(id),cl=(SHOOT_TYPES.find(s=>s.id===b.type)||{}).cat==="Clothing",ids=teamOf(b); let pool=k==="model"?DB.models:k==="photographer"?DB.photographers:k==="creator"?DB.creators:DB.studios; pool=pool.filter(x=>x.status==="approved"&&!ids.includes(x.id)); if(k==="studio"&&b.mode==="studio")pool=pool.filter(s=>s.shoots&&(cl?s.perGarment:s.perProduct)>0); return rank(pool.filter(x=>{for(let i=0;i<(b.days||1);i++)if(!freeOn(x.id,addD(b.date,i)))return false;return true}))} function reassignForm(bid){const b=DB.bookings.find(x=>x.id===bid);openM(`
${b.id}

Reallocate order

${b.partyName} · ${new Date(b.date+"T00:00:00").toDateString()} · ${b.days} day(s). Replacements are free on these dates and listed best-performing first.

${teamOf(b).map(i=>{const al=altsFor(b,i),fl=(b.issues||[]).some(x=>x.who===i&&x.open),k=kindOf(i);return `
${roleBadge(k,34)}
${provOf(i).name}
${RC[k][1]} · ${perfMini(i)}
${fl?'Unavailable':""}
${al.length?`
`:'
No one else is free on these dates. Ask the party to pick a new date or cancel.
'}
`}).join("")}
`)} function doReassign(bid,oldId,newId){const b=DB.bookings.find(x=>x.id===bid),o=provOf(oldId),n=provOf(newId),k=kindOf(oldId); if(k==="creator"){b.crs=crsOf(b).map(x=>x===oldId?newId:x);b.creator=b.crs[0];b.crAdds=addsOf(b).map(x=>x===oldId?newId:x);b.promo=(b.promo||[]).map(x=>x===oldId?newId:x)}else if(k==="model")b.models=b.models.map(x=>x===oldId?newId:x);else if(k==="photographer"){b.phs=phsOf(b).map(x=>x===oldId?newId:x);b.ph=b.phs[0]}else if(b.mode==="studio")b.studio=newId;else b.loc={kind:"listed",id:newId}; (b.issues||[]).forEach(x=>{if(x.who===oldId)x.open=false});logB(b,`(admin) reallocated ${o.name} → ${n.name}`);(b.notices=b.notices||[]).forEach(x=>x.open=false); b.notices.push({open:true,text:`${o.name} is not available for your shoot on ${fmtD(b.date)}, so we've allotted ${n.name} (★ ${perf(newId).stars}), the best available option. Your updated bill is ${inr(tot(b))}. Continue with this, or cancel your booking.`}); save();closeM();toast("Order allotted to "+n.name);render()} function noticesView(){const L=DB.bookings.filter(b=>b.party===ME.id&&b.status!=="Cancelled"&&b.status!=="Completed"&&(b.notices||[]).some(n=>n.open)); return L.map(b=>b.notices.filter(n=>n.open).map(n=>`
📣 Update on ${b.id}

${n.text}

`).join("")).join("")} function ackN(bid){DB.bookings.find(x=>x.id===bid).notices.forEach(n=>n.open=false);save();render()} function cancelB(bid){const b=DB.bookings.find(x=>x.id===bid);b.status="Cancelled";logB(b,"cancelled the booking");(b.notices||[]).forEach(n=>n.open=false);save();toast("Booking cancelled");render()} /* ---- yearly calendars ---- */ let AVM=0; function monthDays(off){const t=new Date(),f=new Date(t.getFullYear(),t.getMonth()+off,1),n=new Date(f.getFullYear(),f.getMonth()+1,0).getDate();return {f,days:Array.from({length:n},(_,i)=>ymd(new Date(f.getFullYear(),f.getMonth(),i+1))),lead:(f.getDay()+6)%7}} function calHead(off,setter){const {f}=monthDays(off);return `
${["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(d=>`${d}`).join("")}
`} function availView(p,label){const {days,lead}=monthDays(AVM),T=ymd(new Date()),bz=busy(p.id),fr=days.filter(d=>d>T&&(p.slots||[]).includes(d)&&!bz.has(d)).length; return `

${label?label+" · ":""}Availability

Plan up to 12 months ahead. Pick a month, then tap dates or use the quick buttons. Brands can only book you on your free dates, and bookings are confirmed instantly.

${calHead(AVM,"AVM")}
${"".repeat(lead)}${days.map(d=>{const dt=new Date(d+"T00:00:00"),b=bz.has(d),on=(p.slots||[]).includes(d),past=d<=T;return ``}).join("")}

${fr} free day${fr===1?"":"s"} this month

`} function monthSlots(id,mode){const p=provOf(id),{days}=monthDays(AVM),T=ymd(new Date()),set=new Set(p.slots||[]); days.filter(d=>d>T).forEach(d=>{const w=new Date(d+"T00:00:00").getDay(),we=w===0||w===6;set.delete(d);if(mode==="all"||(mode==="wd"&&!we)||(mode==="we"&&we))set.add(d)});p.slots=[...set];save();toast("Month updated");render()} /* ---- app install ---- */ function appModal(){openM(`
${logoMark(54)}

Get the BrandShot app

Book shoots, manage bookings and update your free dates from your phone. It installs straight from the browser, with no app store needed.

iPhone

  1. Open this website in Safari
  2. Tap the Share button ⬆
  3. Choose Add to Home Screen
  4. Tap Add. BrandShot appears like an app.

Android

  1. Open this website in Chrome
  2. Tap the ⋮ menu (top right)
  3. Choose Install app or Add to Home screen
  4. Tap Install. Open it from your home screen.

Works for brands, models, photographers and studio partners. Just log in.

`)} const RC={party:["#e2552d","Brand / Vendor","Book shoots & hire creators"],creator:["#7a5af0","Creator","Reels, portfolio & promos"],model:["#c94f7c","Model","Bookings, portfolio & rates"],photographer:["#3d5a98","Photographer","Bookings, work & rates"],studio:["#1f6f5c","Studio Partner","Studios, packages & slots"],admin:["#16130f","Admin","Run the platform"]}; const RP={creator:'',party:'',model:'',photographer:'',studio:'',admin:''}; const roleBadge=(r,sz=40)=>`${RP[r]}`; const logoMark=(sz=36)=>``; function partiesView(ids){const m=new Map(),T=ymd(new Date());DB.bookings.filter(b=>b.status!=="Cancelled"&&teamOf(b).some(i=>ids.includes(i))).forEach(b=>{const x=m.get(b.partyName)||{n:0,bill:0,last:"",next:""};x.n++;x.bill+=teamOf(b).filter(i=>ids.includes(i)).reduce((t,i)=>t+shareOf(b,i),0);if(b.datex.last)x.last=b.date}else if(!x.next||b.date

Parties you work with

${m.size?[...m].map(([n,x])=>`
${n[0]}
${n}
${x.n} shoot${x.n>1?"s":""} · billed ${inr(x.bill)}
${x.next?`Next ${fmtD(x.next)}`:x.last?`Last ${fmtD(x.last)}`:""}
`).join(""):'
No parties yet. Keep your free dates updated to get booked.
'}`} function workView(id,tab){const port=DB.gallery.filter(g=>g.by===id).slice(0,6);return `

Recent work

${port.length?`
${port.map(g=>imgTag(g.src||product(g.kind||"box",g.id))).join("")}
`:'
Upload your recent shoots to win more bookings
'}
`} function nextShoot(fn){const T=ymd(new Date()),up=DB.bookings.filter(b=>b.status==="Confirmed"&&b.date>=T&&fn(b)).sort((a,b)=>a.dateNEXT SHOOT

${fmtD(up.date)} · ${up.partyName}

${tn(up)} · ${up.qty} items · ${locOf(up)}

`:""} function teamsView(){const ids=[...new Set(DB.bookings.filter(b=>b.party===ME.id&&b.status!=="Cancelled").flatMap(teamOf))];if(!ids.length)return ""; return `

Your shoot team

Models, photographers and studios you've worked with. Book them again in one tap.

${ids.map(i=>{const p=provOf(i),k=byId("models",i)?"model":byId("photographers",i)?"photographer":"studio";return `
${roleBadge(k,36)}
${p.name}
${RC[k][1]} · ${p.city}
`}).join("")}
`} const locName=l=>l.kind==="own"?"Own: "+(l.addr||"").slice(0,30):byId("studios",l.id)?.name||"-"; const locOf=b=>b.mode==="creator"?"📍 "+(b.addr||"").slice(0,32):b.mode==="studio"?"📸 "+(byId("studios",b.studio)?.name||"-"):locName(b.loc||{kind:"own"}); const typeName=id=>SHOOT_TYPES.find(s=>s.id===id)?.name||id; function bookingRow(b,actions=""){return `${b.id}
${b.partyName}
${tn(b)}
${b.qty} items · ${b.days}d
${fmtD(b.date)}${locOf(b)}${inr(tot(b))}${stChip(b.status)}${actions?`${actions}`:""}`} const bTable=(rows,act)=>rows.length?`
${act?"":""}${rows.join("")}
BookingShootDateLocationBillStatusAction
`:`
No bookings yet
`; function provRows(ids){const rows=DB.bookings.filter(b=>teamOf(b).some(i=>ids.includes(i))); if(!rows.length)return '
No bookings yet. Keep your availability updated so brands can book you instantly.
'; return `
${rows.map(b=>{const id=teamOf(b).find(i=>ids.includes(i)),bill=shareOf(b,id); return ``}).join("")}
BookingShootDateYour billingBrandShot cutYour payoutStatus
${b.id}
${b.partyName}${ids.length>1?" · "+provOf(id).name:""}
${tn(b)}
${b.qty} items · ${b.days}d
${fmtD(b.date)}${inr(bill)}−${inr(bill*rOf(b))} (${b.comm??5}%)${inr(bill*(1-rOf(b))-feesOn(b,id).reduce((s,c)=>s+c.fee,0))}${feesOn(b,id).map(c=>`
−${inr(c.fee)} cancellation charge (${c.from})
`).join("")}
${stChip(b.status)}${(b.refin||[]).some(r=>r.who===id&&r.st!=="Delivered")?` `:""}${nextFor(b,id)?` `:""}${b.status==="Confirmed"&&b.date>ymd(new Date())&&!(b.issues||[]).some(x=>x.who===id&&x.open)?` `:(b.issues||[]).some(x=>x.who===id&&x.open)?'Reallocating ':""}${b.status!=="Cancelled"?` `:""}
`} function earn(ids){return DB.bookings.filter(b=>b.status!=="Cancelled").reduce((s,b)=>s+teamOf(b).filter(i=>ids.includes(i)).reduce((t,i)=>t+shareOf(b,i)*(1-rOf(b))-feesOn(b,i).reduce((x,c)=>x+c.fee,0),0),0)} function extraForm(bid,who){if(!canF("extras"))return offF("extras");openM(`

Add extra charge

For work or expenses beyond the booking, like extra garments shot, overtime, props or travel. It is added to the party's final bill, and the booking's commission rate applies.

`)} function saveExtra(bid,who){const l=$("xl").value.trim(),a=+$("xa").value;if(!l||!a)return toast("Add a reason and an amount");const b=DB.bookings.find(x=>x.id===bid);(b.extras=b.extras||[]).push({l,a,who});logB(b,`added extra “${l}” ${inr(a)}`,provOf(who)?.name);save();closeM();toast("Extra added to the bill");render()} function togSlot(id,d){const p=provOf(id);p.slots=p.slots||[];const i=p.slots.indexOf(d);i>-1?p.slots.splice(i,1):p.slots.push(d);save();render()} function uploader(onfn){if(ME&&ME.role!=="admin"&&!canF("upload"))return `
Photo uploads are turned off for your account. Please contact BrandShot.
`;return ``} function readFiles(files,cb){if(ME&&ME.role!=="admin"&&!canF("upload"))return offF("upload");[...files].forEach(f=>{const r=new FileReader();r.onload=e=>{const im=new Image();im.onload=()=>{const c=document.createElement("canvas"),s=Math.min(1,600/Math.max(im.width,im.height));c.width=im.width*s;c.height=im.height*s;c.getContext("2d").drawImage(im,0,0,c.width,c.height);cb(c.toDataURL("image/jpeg",.75))};im.src=e.target.result};r.readAsDataURL(f)})} function upModel(files){const m=byId("models",ME.ref);readFiles(files,src=>{DB.gallery.unshift({id:"g"+Date.now()+Math.random(),cat:"Clothing",title:"Model portfolio",by:m.id,byType:"model",src});save();render()});toast("Uploading…")} function upModelDP(files){const m=byId("models",ME.ref);readFiles([files[0]],src=>{m.photo=src;save();render();toast("Profile photo updated")})} function upPh(files){const p=byId("photographers",ME.ref),cat=$("upcat")?.value||"Clothing",title=$("uptitle")?.value||"Reference shoot";const ty=$("uptype")?.value||"";readFiles(files,src=>{DB.gallery.unshift({id:"g"+Date.now()+Math.random(),cat,title,type:ty,by:p.id,byType:"photographer",src});save();render()});toast("Uploading…")} function delG(id){DB.gallery=DB.gallery.filter(g=>g.id!==id);save();render()} function saveRate(kind){if(!canF("rates"))return offF("rates");const o=kind==="model"?byId("models",ME.ref):byId("photographers",ME.ref); document.querySelectorAll("[data-r]").forEach(i=>o.rate[i.dataset.r]=+i.value||0); document.querySelectorAll("[data-f]").forEach(i=>{const k=i.dataset.f;o[k]=k==="tags"?i.value.split(",").map(s=>s.trim()).filter(Boolean):k==="age"?+i.value:i.value}); if(o.name)ME.name=o.name;save();toast("Saved ✓");render()} const D={}; D.party={tabs:[["overview","🏠 Overview"],["book","➕ Book a shoot"],["creator","🎬 Hire a creator"],["bookings","📋 My bookings"],["profile","👤 Profile"]], overview:()=>{const my=DB.bookings.filter(b=>b.party===ME.id);return `
Total bookings${my.length}
Upcoming${my.filter(b=>b.status==="Confirmed").length}
Completed${my.filter(b=>b.status==="Completed").length}
Total spend${inr(my.filter(b=>b.status!=="Cancelled").reduce((a,b)=>a+tot(b),0))}
${noticesView()}

Ready for your next shoot?

Pick a studio package or build your own team, then book a free slot instantly.

${nextShoot(b=>b.party===ME.id)}${teamsView()}

Recent bookings

${bTable(my.slice(0,5).map(b=>bookingRow(b)))}
`}, book:()=>{if(!WIZ)startBookSilent();return wizView()}, creator:()=>{if(!CW)CW=newCW();return crWiz()}, bookings:()=>{const my=DB.bookings.filter(b=>b.party===ME.id);return `${noticesView()}

My bookings

Bookings are confirmed instantly. If the team adds extras on shoot day (more garments, overtime, props), they appear in your final bill.

${bTable(my.map(b=>bookingRow(b,`${b.status==="Delivered"?` `:""}${b.status==="Completed"&&!b.rated&&canF("review")?` `:""}${b.status==="Confirmed"&&b.date>ymd(new Date())?` `:""}${rfOpen(b)&&rfWho(b).length?` `:""}${printBtn(b)} `)),1)}
`}, profile:()=>`

Brand profile

`}; function viewB(id){const b=DB.bookings.find(x=>x.id===id),c=calcBooking(b),ids=teamOf(b),adm=ME&&ME.role==="admin"; openM(`
${b.id} ${stChip(b.status)}

${tn(b)}

${b.partyName} · ${new Date(b.date+"T00:00:00").toDateString()} · ${b.days} day(s) · ${locOf(b)}

${progressBar(b)}

Team

${ids.map(i=>`
${roleBadge(kindOf(i),22)} ${provOf(i)?.name}Booked
`).join("")}
${c.lines.map(x=>`
${x.l}${inr(x.a)}
`).join("")}
GST (18%)${inr(c.gst)}
${b.extras?.length?"Final bill":"Total bill"}${inr(c.total)}
${adm?`

BrandShot commission (${b.comm??5}% of each provider's billing)

${ids.map(i=>{const s=shareOf(b,i);return `
${provOf(i)?.name} · billing ${inr(s)}${inr(s*rOf(b))}
`}).join("")}`:""} ${(b.refin||[]).length?`

Re-finishing

${rfList(b,ME&&!["party","admin"].includes(ME.role)?myListings().map(x=>x.id):null)}`:""} ${ME&&((ME.role==="party"&&rfOpen(b))||(ME.role==="admin"&&b.status==="Completed"))&&rfWho(b).length?`
${ME.role==="party"?printBtn(b):""}
`:ME?.role==="party"?`
${printBtn(b)}
`:""} ${b.notes?`

📝 ${b.notes}

`:""}

Activity

${(b.log||[]).slice().reverse().map(l=>`
${l.who} ${l.text}${fmtT(l.t)}
`).join("")||'
No updates yet
'}
`)} const provKpis=(ids,extra)=>{const rq=DB.bookings.filter(b=>teamOf(b).some(i=>ids.includes(i)));return `
Bookings${rq.length}
Upcoming${rq.filter(b=>b.status==="Confirmed").length}
Your payout (after commission)${inr(earn(ids))}
${extra[0]}${extra[1]}
`}; D.model={tabs:[["overview","🏠 Overview"],["bookings","📋 My bookings"],["avail","📅 Availability"],["portfolio","🖼️ My portfolio"],["rate","💰 Rate card"],["profile","👤 Profile"],["bills","🧾 Bills"]],bills:()=>billsTab(), overview:()=>{const m=byId("models",ME.ref);return `${m.status!=="approved"?`
⏳ Your profile is waiting for admin approval. Add photos, your rate card and availability in the meantime.
`:""}${provKpis([m.id],["Free days (12 months)",(m.slots||[]).filter(d=>!busy(m.id).has(d)).length])} ${nextShoot(b=>teamOf(b).includes(m.id))}${perfPanel(m.id)}${partiesView([m.id])}${workView(m.id,"portfolio")}

Your public card

${modelCard(m)}
`}, bookings:()=>`

My bookings

Brands book you instantly on your free dates. ${commLine()} Use “+ Extra” if the shoot needed more work.

${provRows([ME.ref])}
`, avail:()=>availView(byId("models",ME.ref)), portfolio:()=>{const m=byId("models",ME.ref),port=DB.gallery.filter(g=>g.by===m.id);return `

Product shoot portfolio

Upload photos from your past product shoots. They appear on your profile and in the gallery.

${uploader("upModel")}
${port.map(g=>`
${imgTag(g.src||avatar(g.id+m.id,m.g))}
`).join("")}
`}, rate:()=>{const m=byId("models",ME.ref),r=m.rate;return `

Rate card & expenses

Everything the party pays for you. Parties see this full breakdown before booking.

${[["day","Full day fee"],["half","Half day fee"],["hour","Hourly rate (optional)"],["makeup","Hair & makeup"],["travel","Travel / conveyance"],["food","Food"],["other","Stay / agency / other"]].map(([k,l])=>`
`).join("")}
All-in per day = fee + makeup + travel + food + other${inr(modelCost(m))}

You currently receive ${100-curRate()}%: ${inr(modelCost(m)*(1-curRate()/100))} per day.

`}, profile:()=>{const m=byId("models",ME.ref);return `

Model details

${m.photo?``:avatar(m.id,m.g)}
`}}; D.photographer={tabs:[["overview","🏠 Overview"],["bookings","📋 My bookings"],["avail","📅 Availability"],["portfolio","🖼️ Post photos"],["rate","💰 Rates & requirements"],["refin","✨ Re-finishing"],["profile","👤 Profile"],["bills","🧾 Bills"]],bills:()=>billsTab(),refin:()=>refinTab(), overview:()=>{const p=byId("photographers",ME.ref);return `${p.status!=="approved"?`
⏳ Your profile is waiting for admin approval.
`:""}${provKpis([p.id],["Free days (12 months)",(p.slots||[]).filter(d=>!busy(p.id).has(d)).length])} ${nextShoot(b=>teamOf(b).includes(p.id))}${perfPanel(p.id)}${partiesView([p.id])}${workView(p.id,"portfolio")}

Your public card

${phCard(p)}
`}, bookings:()=>`

My bookings

Brands book you instantly on your free dates. ${commLine()} Use “+ Extra” for extra images, overtime or travel.

${provRows([ME.ref])}
`, avail:()=>availView(byId("photographers",ME.ref)), portfolio:()=>{const p=byId("photographers",ME.ref),port=DB.gallery.filter(g=>g.by===p.id);return `

Post reference photos

Your best clothing and FMCG shots. They show on your profile and in the public gallery.

${uploader("upPh")}
${port.map(g=>`
${imgTag(g.src||product(g.kind,g.id),g.title)}
`).join("")}
`}, rate:()=>{const p=byId("photographers",ME.ref),r=p.rate;return `

Rate card & expenses

Everything the party pays for your shoot.

${[["day","Day fee"],["assistant","Assistant"],["equipment","Equipment & lights"],["travel","Travel"],["perImg","Editing per image"]].map(([k,l])=>`
`).join("")}
All-in per day (excluding editing)${inr(phCost(p))}

Requirements from the party

`}, profile:()=>{const p=byId("photographers",ME.ref);return `

Photographer details

`}}; const myStudios=()=>DB.studios.filter(s=>s.owner===ME.id); D.studio={tabs:[["overview","🏠 Overview"],["bookings","📋 Bookings"],["avail","📅 Availability"],["listings","🏢 Studios & shoot packages"],["refin","✨ Re-finishing"],["bills","🧾 Bills"]],bills:()=>billsTab(),refin:()=>refinTab(), overview:()=>{const mine=myStudios(),ids=mine.map(s=>s.id);return `${provKpis(ids,["Listings",mine.length])} ${nextShoot(b=>teamOf(b).some(i=>ids.includes(i)))}${mine.map(s=>perfPanel(s.id,s.name)).join("")}${partiesView(ids)}

My studios

${mine.map(s=>stCard(s)).join("")||'
No listings yet
'}
`}, bookings:()=>`

Bookings

Rentals and studio shoot packages booked on your free dates. ${commLine()} Use “+ Extra” for more garments shot, overtime or props.

${provRows(myStudios().map(s=>s.id))}
`, avail:()=>myStudios().map(s=>availView(s,s.name)).join("")||'
Add a studio first
', listings:()=>`${myStudios().map(s=>`

${s.name}

${stChip(s.status)}

📍 ${s.area}, ${s.city}

${s.shoots?`

Package price covers studio space, photographer, lights and basic editing. Put 0 if you don't shoot that category. Model charges are billed to the party separately.

${rank(DB.models.filter(m=>m.status==="approved")).map(m=>``).join("")}
`:""}
`).join("")}

Add a studio or set

New listings go live after admin approval. You can turn on photoshoot packages after adding.

`}; function setS(id,k,v){byId("studios",id)[k]=v;save();toast("Saved ✓");if(k==="shoots")render()} function togPref(sid,mid){const s=byId("studios",sid);s.pref=s.pref||[];const i=s.pref.indexOf(mid);i>-1?s.pref.splice(i,1):s.pref.push(mid);save()} function addStudio(){const n=$("sn").value.trim();if(!n||!$("sd").value)return toast("Please add the name and day rent"); DB.studios.push({id:"s"+Date.now(),name:n,owner:ME.id,city:$("sc").value||"-",area:$("sa").value||"-",size:$("ss").value||"-",tags:$("st").value.split(",").map(x=>x.trim()).filter(Boolean),hour:+$("sh").value||0,day:+$("sd").value,rating:5,status:"pending",shoots:false,perGarment:0,perProduct:0,pref:[],slots:nextDays(35)});save();toast("Listing submitted for approval");render()} const commOf=b=>b.status==="Cancelled"?0:teamOf(b).reduce((s,i)=>s+shareOf(b,i)*rOf(b),0); function setComm(on){DB.settings.comm=on;save();toast(on?"Commission started":"Commission stopped");render()} function setRate(v){v=Math.max(0,Math.min(50,+v||0));DB.settings.rate=v;save();toast("Rate set to "+v+"%");render()} let ABF="All",BQ="",BPG=0; D.admin={tabs:[["overview","📊 Overview"],["enq","📨 Enquiries"],["vbills","🧾 Vendor bills"],["feat","🛡️ Feature controls"],["site","⚙️ Website settings"],["listings","👥 Manage listings"],["types","🧩 Shoot types"],["banners","🖼️ Banners"],["spot","📣 Spotlight"],["comm","💸 Commission"],["bookings","📋 All bookings"],["approvals","✅ Approvals"],["users","👥 Users"],["gallery","🖼️ Gallery"]], overview:()=>{const B=DB.bookings,live=B.filter(b=>b.status!=="Cancelled"); const pend=DB.models.filter(m=>m.status==="pending").length+DB.photographers.filter(p=>p.status==="pending").length+DB.studios.filter(s=>s.status==="pending").length; return `
Total bookings${B.length}
Booking value (incl. GST)${inr(live.reduce((a,b)=>a+tot(b),0))}
Commission earned${inr(B.reduce((a,b)=>a+commOf(b),0))}
Pending approvals${pend}
Models${DB.models.length}
Photographers${DB.photographers.length}
Studios${DB.studios.length}
Studio shoot packages${DB.studios.filter(s=>s.shoots).length}
${(()=>{const fl=B.filter(b=>b.status==="Confirmed"&&(b.issues||[]).some(x=>x.open));return fl.length?`

⚠ Needs reallocation (${fl.length})

A team member can't make it. The party has been told the best available option will be allotted, or they can cancel.

${fl.map(b=>`
${b.id} · ${b.partyName}
${fmtD(b.date)} · unavailable: ${b.issues.filter(x=>x.open).map(x=>provOf(x.who).name).join(", ")}
`).join("")}
`:""})()}${(()=>{const ev=DB.bookings.flatMap(b=>(b.log||[]).map(l=>({...l,b}))).sort((a,b)=>b.t-a.t).slice(0,8);return `

Live updates

Latest actions from parties, models, photographers, studios and creators.

${ev.map(e=>`
${e.who} ${e.text} ${e.b.id}${fmtT(e.t)}
`).join("")}
`})()}

Latest bookings

${bTable(B.slice(0,6).map(b=>bookingRow(b,`${inr(commOf(b))}`)),1)}

The last column is BrandShot's commission per booking, including extras.

`}, spot:()=>spotAdmin(), enq:()=>enqAdmin(),feat:featAdmin,vbills:()=>vbillsAdmin(), site:()=>siteAdmin(), listings:()=>listAdmin(), types:()=>typesAdmin(), banners:()=>bannerAdmin(), comm:()=>{const st=DB.settings,earned=DB.bookings.reduce((a,b)=>a+commOf(b),0);return `

Commission

BrandShot's cut from each model's, photographer's and studio's billing, including extras. The party never pays it.

${st.comm?"● Active":"● Stopped"}
${st.comm?``:``}
New bookings lock in the rate at the time of booking: ${st.comm?st.rate+"%":"0% (stopped)"}. Existing bookings keep their own rate, so starting or stopping never changes past bills or payouts.
Total commission earned${inr(earned)}
Bookings with commission${DB.bookings.filter(b=>(b.comm??5)>0&&b.status!=="Cancelled").length}
Commission-free bookings${DB.bookings.filter(b=>(b.comm??5)===0).length}
Current rate${curRate()}%

Commission by booking

${bTable(DB.bookings.map(b=>bookingRow(b,`${b.comm??5}% · ${inr(commOf(b))}`)),1)}
`}, bookings:()=>{const F={All:()=>1,"Upcoming":b=>b.status==="Confirmed","In progress":b=>["Checked in","Shoot done"].includes(b.status),"Delivered":b=>b.status==="Delivered","Completed":b=>b.status==="Completed","Cancelled":b=>b.status==="Cancelled","Needs reallocation":b=>(b.issues||[]).some(x=>x.open)},L=DB.bookings.filter(F[ABF]||F.All); return `

All bookings

Every booking on the platform. Statuses update live as parties, models, photographers, studios and creators mark progress.

${Object.keys(F).map(k=>``).join("")}
${(()=>{const q=BQ.trim().toLowerCase(),M=q?L.filter(b=>[b.id,b.partyName,tn(b),locOf(b).replace(/<[^>]+>/g,""),b.status].join(" ").toLowerCase().includes(q)):L,PS=15,pages=Math.max(1,Math.ceil(M.length/PS));if(BPG>=pages)BPG=pages-1;const P=M.slice(BPG*PS,BPG*PS+PS); return `
${M.length} found
${bTable(P.map(b=>bookingRow(b,`
${["Completed","Cancelled"].includes(b.status)?"":``}${b.status==="Completed"?``:""}
`)),1)} ${pages>1?`
${[...Array(pages).keys()].filter(i=>i<2||i>pages-3||Math.abs(i-BPG)<2).map((i,j,a)=>`${j&&i-a[j-1]>1?"…":""}`).join("")}
`:""}`})()}
`}, approvals:()=>{const rows=[...DB.creators.map(x=>["creators","🎬 Creator",x]),...DB.models.map(x=>["models","💃 Model",x]),...DB.photographers.map(x=>["photographers","📷 Photographer",x]),...DB.studios.map(x=>["studios","🏢 Studio",x])]; return `

Profile & listing approvals

${rows.sort((a,b)=>(a[2].status==="pending"?-1:1)).map(([k,t,x])=>``).join("")}
TypeNameCityRate / dayStatusAction
${t}${x.name}${x.city}${inr(k==="creators"?x.rate.reel:k==="models"?modelCost(x):k==="photographers"?phCost(x):x.day)}${stChip(x.status)}${x.status!=="approved"?``:""} ${x.status!=="rejected"?``:""}
`}, users:()=>`

Registered logins

${DB.users.map(u=>``).join("")}
NameRoleEmail
${u.name}${roleIcon(u.role)} ${roleName(u.role)}${u.email}
`, gallery:()=>`

Gallery moderation

Remove any photo that shouldn't be public.

${DB.gallery.map(g=>{const who=g.byType==="model"?byId("models",g.by):byId("photographers",g.by);return `
${imgTag(g.src||(g.kind==="avatar"?avatar(g.id+g.by,who?.g||"f"):product(g.kind,g.id)),who?.name.split(" ")[0]||"")}
`}).join("")}
`}; let FQ=""; function fSet(k,v){DB.settings.feat=Object.assign({},DB.settings.feat||{},{[k]:v});save();toast("Saved, now live");render()} function fU(uid,k,v){const U=DB.settings.featU=DB.settings.featU||{};U[uid]=U[uid]||{};if(v==="")delete U[uid][k];else U[uid][k]=v==="1";if(!Object.keys(U[uid]).length)delete U[uid];save();toast("Saved, now live");render()} function waive(bid,i){const b=DB.bookings.find(x=>x.id===bid);b.cxls[i].waived=!b.cxls[i].waived;LEDG=null;save();toast(b.cxls[i].waived?"Charge waived":"Charge restored");render()} function featAdmin(){const f=fset(),q=FQ.trim().toLowerCase(),U=DB.users.filter(u=>u.role!=="admin"&&(!q||(u.name+" "+u.role+" "+(u.email||"")).toLowerCase().includes(q))),ov=(DB.settings.featU||{}); const sw=(k)=>``; const L=ledger().all; return `

Feature controls

Turn features on or off for everyone, or for one person below. Changes go live straight away.

${FEATS.map(([k,n,d,r])=>`
${n}
${d} · ${r.map(x=>roleName(x)||(RC[x]||[])[1]||"Creator").join(", ")}
${sw(k)}
`).join("")}

Cancellation charges

When someone cancels a booking they already confirmed. A party pays it on their next booking's bill. A model, photographer, creator or studio has it taken from their next order's payout.

${L.length?`
${L.map(c=>{const b=DB.bookings.find(x=>x.id===c.from),i=b.cxls.findIndex(x=>x.t===c.t&&x.who===c.who),nm=c.party?(DB.users.find(u=>u.id===c.who)||{}).name:provOf(c.who)?.name; return ``}).join("")}
WhoBooking cancelledChargeStatus
${nm||c.who}
${c.party?"Party":roleName(kindOf(c.who))}
${c.from}
${fmtT(c.t)}
${inr(c.fee)}${c.waived?'Waived':c.on?`Recovered on ${c.on}`:'Due on next order'}
`:'
No cancellation charges yet
'}

Per-person controls

"Default" follows the setting above. Choose Allow or Block to override it for one person.

${FEATS.map(x=>``).join("")}${U.slice(0,60).map(u=>`${FEATS.map(([k,n,d,r])=>``).join("")}`).join("")}
Person${x[1]}
${u.name}
${roleName(u.role)||(RC[u.role]||[])[1]||u.role}
${r.includes(u.role)?``:'-'}
${U.length>60?`

Showing 60 of ${U.length}. Search to find someone.

`:""}
`} function setBS(id,s){const b=DB.bookings.find(b=>b.id===id);b.status=s;logB(b,`(admin) set status to “${s}”`);save();toast("Status updated");render()} function setSt(k,id,s){byId(k,id).status=s;save();toast(s==="approved"?"Approved ✓":"Updated");render()} function resetDemo(){DB=structuredClone(SEED);save();ME=DB.users.find(u=>u.role==="admin");toast("Demo data reset");render()} /* ================= CREATORS ================= */ const crCard=(c,pick)=>`
${c.photo?``:avatar(c.id,c.g)}🎬 Creator${c.promo?.on?" · 📣 "+c.followers:""}

${c.name}

📍 ${c.city} · ${c.exp}
${perfMini(c.id)}
${topChip(c.id)}${c.niche.slice(0,3).map(t=>`${t}`).join("")}
${pick?`
Reel ${inr(c.rate.reel)} · Photo ${inr(c.rate.photo)}
`:'
View profile →
'}
`; const workTile=w=>`
${imgTag(w.src,w.title||"")}${w.type==="reel"?'▶':""}${w.link?`Watch`:""}
`; function showCr(id,sel){const c=byId("creators",id);openP(`
Creator

${c.name}

${c.city} · ${c.exp} · ${perfMini(c.id)}${c.promo?.on?` · ${c.followers} followers`:""}

${c.bio}

${c.niche.map(t=>`${t}`).join("")}

Performance

${perfBox(c.id)}

Rate card

${c.rate.hour?``:""}${c.promo?.on?``:""}
Per reel / video${inr(c.rate.reel)}
Per edited photo${inr(c.rate.photo)}
Hourly rate${inr(c.rate.hour)}/hr
Travel per day${inr(c.rate.travel)}
📣 Promotion on their page${inr(c.promo.price)}

Portfolio

${c.work.map(workTile).join("")}
`)} V.creators=()=>`
Creators

${S("pg.creators.t")}

${S("pg.creators.s")}

${sortBar("creators")}
${sortL("creators",DB.creators.filter(c=>c.status==="approved")).map(c=>crCard(c)).join("")}
`; const byLine=x=>{const c=x.by&&provOf(x.by);return `📍 ${x.city}${c?` · ${kindOf(x.by)==="creator"&&x.promoBy?"":"🎬 Shot by "}${c.name}`:""}`}; const spotLeft=x=>Math.max(0,48-(Date.now()-x.at)/3600e3); let SPT="video",SPN=12; const ytOk=u=>/^https?:\/\/(www\.|m\.)?(youtube\.com\/(shorts\/|watch\?v=)|youtu\.be\/)/i.test(u||""); const spCard=x=>x.type==="video" ?`${x.src?``:'
'}▶ Shorts
${x.vendor}${byLine(x)}
` :`
${x.vendor}${byLine(x)}
`; function spPhoto(id){const x=DB.spot.find(y=>y.id===id);openM(`
BrandShot Spotlight

${x.vendor}

${byLine(x)}

${x.caption?`

${x.caption}

`:""}
`)} V.spotlight=()=>{const L=DB.spot.filter(x=>x.type===SPT).sort((a,b)=>b.at-a.at),nV=DB.spot.filter(x=>x.type==="video").length,nP=DB.spot.filter(x=>x.type==="photo").length; return `
BrandShot Spotlight

${S("pg.spotlight.t")}

${S("pg.spotlight.s")}

${L.length?`
${L.slice(0,SPN).map(spCard).join("")}
`:'
New posts coming soon.
'} ${L.length>SPN?`
`:""}
`}; /* creator booking wizard */ let CW=null; const newCW=(pre={})=>({crs:pre.creator?[pre.creator]:[],byHour:false,hours:3,step:0,biz:"Shop",photo:true,video:true,reels:3,photos:20,days:1,addr:"",creator:pre.creator||null,promo:[],date:"",notes:"",mo:0,city:"All"}); function startCreator(pre={}){CW=newCW(pre);if(!ME||ME.role!=="party"){LROLE="party";LMODE="login";toast("Login as a Brand / Vendor to hire creators");go("login");return}go("dash");DTAB="creator";render()} const cwSteps=["What you need","Creator","Promotion","Pick a slot"]; const cwBooking=w=>({...w,mode:"creator",type:"cr",qty:(w.video?w.reels:0)+(w.photo?w.photos:0),models:[],extras:[]}); function crWiz(){const w=CW,cur=cwSteps[w.step],b=cwBooking(w); const nav=`
${cwSteps.map((s,i)=>`${i+1}. ${s}`).join("")}
`;let body=""; if(cur==="What you need")body=`

Your business

${["Shop","Hotel","Restaurant / Café","Event","Brand"].map(x=>``).join("")}

What do you want?

${[["photo","📸 Photoshoot","Edited photos for posts & listings"],["video","🎬 Reels / Video","Short videos for Instagram & ads"],["both","✨ Both","Photos + reels in one visit"]].map(([k,t,d])=>{const on=k==="both"?w.photo&&w.video:k==="photo"?w.photo&&!w.video:w.video&&!w.photo;return `
${t}
${d}
`}).join("")}
${w.video?`
`:""}${w.photo?`
`:""}

How do you want to pay?

${w.byHour?`

Creators with an hourly rate are charged by the hour. Others are charged per reel or photo.

`:""}
`; if(cur==="Creator"){const cities=["All",...new Set(DB.creators.filter(c=>c.status==="approved").map(c=>c.city))];const L=sortL("creators",DB.creators.filter(c=>c.status==="approved"&&(w.city==="All"||c.city===w.city))); body=`

Choose your creators

Creators from across India, best performers first. Prices are per reel and per photo.

${cities.map(c=>``).join("")}
${sortBar("creators")}
${L.map(c=>pickRow("creator",c,w.crs.includes(c.id),`togA(CW,'crs','${c.id}')`)).join("")}
`} if(cur==="Promotion"){const L=rank(DB.creators.filter(c=>c.status==="approved"&&c.promo?.on)); body=`
🎁 Free with every creator shoot: your shoot is featured for 48 hours on BrandShot's Instagram page and the BrandShot Spotlight page.

Want more reach? Add influencer promotion (optional)

Influencers post your reel on their own page. Charged separately per post. Skip this if you don't need it.

${L.map(c=>`
${c.name}
📣 ${c.followers} followers · ${c.niche[0]}
${inr(c.promo.price)} /post
`).join("")}
`} if(cur==="Pick a slot"){const mo=w.mo||0,{days,lead}=monthDays(mo),T=ymd(new Date()); body=`

Pick a free date

Green dates are when ${w.crs.map(id=>byId("creators",id).name).join(" and ")||"your creators"} ${w.crs.length>1?"are":"is"} free. Booking is confirmed instantly.

${calHead(mo,"CW.mo")}
${"".repeat(lead)}${days.map(d=>{const ok=d>T&&teamFree(b,d),dt=new Date(d+"T00:00:00");return ``}).join("")}
`} const c=calcBooking(b),last=cur==="Pick a slot"; return `

🎬 Hire a creator

Reels and photos for your shop, hotel or event, from creators across India.

${nav}
${body}
${w.step>0?``:""}
Total incl. GST${inr(c.total)}View cost breakdown
${!last?``:``}

Cost breakdown

${c.lines.map(x=>`
${x.l}${x.a?inr(x.a):"Free"}
`).join("")}
GST (18%)${inr(c.gst)}
Total${inr(c.total)}
${w.step>0?``:""}
Total incl. GST · tap for details${inr(c.total)}
${!last?``:``}
`} function togPromo(id){const a=CW.promo,i=a.indexOf(id);i>-1?a.splice(i,1):a.push(id);render()} function cwNext(){const w=CW,cur=cwSteps[w.step]; if(cur==="What you need"&&!w.addr.trim())return toast("Please enter the shoot address"); if(cur==="Creator"&&!w.crs.length)return toast("Please choose at least one creator"); w.step++;render();window.scrollTo(0,0)} function confirmCr(){const w=CW,b0=cwBooking(w);if(!w.date)return toast("Please pick a free date");if(!teamFree(b0,w.date))return toast("That slot was just taken. Pick another date"); const b={id:"BSS"+(1047+DB.bookings.length),party:ME.id,partyName:ME.brand||ME.name,mode:"creator",type:"cr",cat:"Creators",creator:w.crs[0],crs:[...w.crs],byHour:w.byHour,hours:w.hours,promo:[...w.promo],photo:w.photo,video:w.video,reels:w.reels,photos:w.photos,qty:b0.qty,days:w.days,biz:w.biz,addr:w.addr,models:[],date:w.date,notes:w.notes,status:"Confirmed",extras:[],comm:curRate(),log:[{t:Date.now(),who:ME.brand||ME.name,role:"party",text:"hired the creator (instant confirmation)"}]}; DB.bookings.unshift(b);save();CW=null;DTAB="bookings";render(); openM(`
🎬

Creator booked!

ID ${b.id} · ${new Date(b.date+"T00:00:00").toDateString()} · ${inr(tot(b))}

${crsOf(b).map(id=>byId("creators",id).name).join(" & ")} confirmed. After the shoot, your business gets a free 48-hour feature on BrandShot's Instagram and Spotlight page.

`)} /* creator dashboard */ function upCr(files){const c=byId("creators",ME.ref),t=$("crt")?.value||"",ty=$("crty")?.value||"photo",lk=$("crl")?.value||"";readFiles(files,src=>{c.work.unshift({src,type:ty,title:t,link:lk});save();render()});toast("Uploading…")} function delW(i){byId("creators",ME.ref).work.splice(i,1);save();render()} function saveCr(){if(!canF("rates"))return offF("rates");const c=byId("creators",ME.ref);document.querySelectorAll("[data-cr]").forEach(i=>c.rate[i.dataset.cr]=+i.value||0); document.querySelectorAll("[data-cf]").forEach(i=>{const k=i.dataset.cf;c[k]=k==="niche"?i.value.split(",").map(x=>x.trim()).filter(Boolean):i.value}); const on=$("cpo");if(on){c.promo={on:on.checked,price:+$("cpp").value||0}}if(c.name)ME.name=c.name;save();toast("Saved ✓");render()} function upCrDP(files){const c=byId("creators",ME.ref);readFiles([files[0]],src=>{c.photo=src;save();render()})} D.creator={tabs:[["overview","🏠 Overview"],["bookings","📋 My bookings"],["avail","📅 Availability"],["portfolio","🎞️ Portfolio"],["rate","💰 Rates & promotion"],["refin","✨ Re-finishing"],["profile","👤 Profile"],["bills","🧾 Bills"]],bills:()=>billsTab(),refin:()=>refinTab(), overview:()=>{const c=byId("creators",ME.ref);return `${c.status!=="approved"?`
⏳ Your profile is waiting for admin approval. Add your portfolio, rates and free dates in the meantime.
`:""}${provKpis([c.id],["Free days (12 months)",(c.slots||[]).filter(d=>!busy(c.id).has(d)).length])} ${nextShoot(b=>schedOf(b).includes(c.id))}${perfPanel(c.id)}${partiesView([c.id])}

Recent work

${c.work.slice(0,6).map(workTile).join("")}

Your public card

${crCard(c)}
`}, bookings:()=>`

My bookings

Shoots and promotion posts booked by vendors. ${commLine()} Use “+ Extra” for extra reels or travel.

${provRows([ME.ref])}
`, avail:()=>availView(byId("creators",ME.ref)), portfolio:()=>{const c=byId("creators",ME.ref);return `

Portfolio

Add your best photos and reels. For a reel, upload a cover image and paste the Instagram or YouTube link.

${uploader("upCr")}
${c.work.map((w,i)=>`
${workTile(w)}
`).join("")}
`}, rate:()=>{const c=byId("creators",ME.ref);return `

Rate card

What vendors pay you. Shown on your profile before they book.

Influencer promotion

Offer to post vendors' reels on your own page for a separate fee.

`}, profile:()=>{const c=byId("creators",ME.ref);return `

Creator profile

${c.photo?``:avatar(c.id,c.g)}
`}}; /* admin spotlight */ let SPIMG=""; function spImg(files){readFiles([files[0]],src=>{SPIMG=src;render()})} function addSpot(){const v=$("spv").value.trim(),src=SPIMG||$("spg").value,ty=$("spt").value,lk=$("spl").value.trim();if(!v)return toast("Add the vendor name");if(ty==="video"&&!ytOk(lk))return toast("Paste a valid YouTube Shorts link");if(ty==="photo"&&!src)return toast("Add a photo"); DB.spot.unshift({id:"sp"+Date.now(),vendor:v,city:$("spc").value||"",caption:$("spcap").value||"",src,type:ty,link:lk,insta:$("spi").checked,by:$("spby").value,at:Date.now()});SPIMG="";save();toast("Published to Spotlight for 48 hours");render()} function delSpot(id){DB.spot=DB.spot.filter(x=>x.id!==id);save();render()} function renewSpot(id){DB.spot.find(x=>x.id===id).at=Date.now();save();toast("Featured again for 48 hours");render()} const spotAdmin=()=>{const vend=DB.bookings.filter(b=>b.mode==="creator").map(b=>b.partyName);const imgs=[...new Set([...DB.creators.flatMap(c=>c.work.map(w=>w.src)),...DB.gallery.map(g=>g.src)].filter(x=>x&&x.startsWith("img/")))]; return `

📣 Post to Spotlight

For videos, paste the YouTube Shorts link and add a cover photo. For photos, upload story-size images (9:16, e.g. 1080 × 1920), the same size as Instagram, WhatsApp and Facebook stories. Feature a vendor free for 48 hours on the website's Spotlight page. Tick Instagram once you've also posted it on BrandShot's Instagram page.

${[...new Set(vend)].map(v=>`

Spotlight posts

${DB.spot.sort((a,b)=>b.at-a.at).map(x=>`
${x.type==="video"?"🎬":"📸"} ${x.vendor}
${x.city}${x.insta?" · Instagram ✓":""}${x.type==="video"?(ytOk(x.link)?" · YouTube ✓":" · ⚠ add YouTube link"):""}
${x.type==="video"?``:""}
${spotLeft(x)>0?`Live · ${Math.ceil(spotLeft(x))}h left`:`Ended `}
`).join("")||'
No posts yet
'}
`}; /* ---- slide-out menu ---- */ function toggleMenu(open){document.body.classList.toggle("mopen",open===undefined?!document.body.classList.contains("mopen"):open)} /* ---- modern icon set ---- */ const IC={eye:'',swap:'',call:'',mail:'',home:'',tag:'',image:'',user:'',video:'',camera:'',building:'',mega:'',phone:'',login:'',logout:'',grid:'',plus:'',clip:'',cal:'',wallet:'',users:'',gear:'',pct:'',check:'',chart:'',star:''}; const ICOL={home:"#e2552d",tag:"#d4a017",image:"#2a9d8f",user:"#c94f7c",video:"#7a5af0",camera:"#3d5a98",building:"#1f6f5c",mega:"#e76f51",phone:"#264653",login:"#16130f",logout:"#b2321b",grid:"#e2552d",plus:"#e2552d",clip:"#3d5a98",cal:"#2a9d8f",wallet:"#d4a017",users:"#c94f7c",gear:"#5c544a",pct:"#1f6f5c",check:"#2a9d8f",chart:"#7a5af0",star:"#d4a017"}; const ico=(n,sz=18)=>`${IC[n]||IC.grid}`; const TABI={enq:"mail",types:"grid",overview:"grid",book:"plus",creator:"video",bookings:"clip",profile:"user",avail:"cal",portfolio:"image",rate:"wallet",listings:"users",site:"gear",banners:"image",spot:"mega",comm:"pct",approvals:"check",users:"users",gallery:"image",requests:"clip"}; function drawerHTML(){const pub=[["home","home","Home"],["about","users","About us"],["contact","call","Contact us"],["pricing","tag","Pricing"],["gallery","image","Gallery"],["models","user","Models"],["creators","video","Creators"],["photographers","camera","Photographers"],["locations","building","Studios & locations"],["spotlight","mega","Spotlight"]]; const link=(fn,i,l,on)=>`${ico(i)}${l}›`; let h=`
${logoMark(32)}BrandShot.Studio
`; if(ME){h+=`
${roleBadge(ME.role,40)}
${ME.name}${roleName(ME.role)}
My dashboard
`+D[ME.role].tabs.map(([k,l])=>link(`DTAB='${k}';go('dash');DTAB='${k}';render()`,TABI[k]||"grid",l.slice(l.indexOf(" ")+1),VIEW==="dash"&&DTAB===k)).join("")} else h+=`
`; h+=`
Explore
`+pub.map(([v,i,l])=>link(v==="pricing"?"goSec('pricing')":`go('${v}')`,i,l,VIEW===v&&v!=="pricing")).join(""); h+=`
More
`+link("appModal()","phone","Get the app")+(ME?link("logout()","logout","Logout"):link("go('login')","login","Login / Sign up")); return h} /* ---- booking status flow & activity log ---- */ const FLOW=["Confirmed","Checked in","Shoot done","Delivered","Completed"]; const fmtT=t=>new Date(t).toLocaleString("en-IN",{day:"numeric",month:"short",hour:"numeric",minute:"2-digit"}); function logB(b,text,by){(b.log=b.log||[]).push({t:Date.now(),who:by||(ME?ME.name:"System"),role:ME?ME.role:"",text})} function stepB(bid,st,who){const b=DB.bookings.find(x=>x.id===bid);b.status=st;if(st==="Delivered")b.tDel=Date.now();logB(b,`marked “${st}”`,provOf(who)?.name||ME?.name); if(st==="Delivered")(b.notices=b.notices||[]).push({open:true,text:`Your ${b.mode==="creator"?"reels/photos":"photos"} for ${b.id} have been delivered. Please check them and tap “Received” to complete the booking.`}); save();toast("Status updated: "+st);render()} function nextFor(b,id){const k=kindOf(id),i=FLOW.indexOf(b.status);if(i<0||i>=3)return null;const nx=FLOW[i+1];if(nx==="Delivered"&&k==="model")return null;return nx} const lastLog=b=>{const l=(b.log||[]).at(-1);return l?`${l.who} ${l.text} · ${fmtT(l.t)}`:""}; function progressBar(b){if(b.status==="Cancelled")return '
Cancelled
';const i=FLOW.indexOf(b.status);return `
${FLOW.map((s,j)=>`
${j${s}
`).join("")}
`} /* ---- banner slider ---- */ const BACT={book:["Book a shoot","startBook()"],creator:["Hire a creator","startCreator()"],events:["Event shoots","startBook({cat:'Events'})"],pricing:["Pricing","goSec('pricing')"],studios:["Studios","go('locations')"],models:["Models","go('models')"],spotlight:["Spotlight","go('spotlight')"]}; let BI=0; /* ================= BANNER TEMPLATES ================= */ const LACT={book:"startBook()",creator:"startCreator()",events:"startBook({cat:'Events'})",birthday:"startBook({cat:'Events',type:'ev1'})",inaug:"startBook({cat:'Events',type:'ev4'})",prewed:"startBook({cat:'Events',type:'ev2'})",bizevent:"startBook({cat:'Events',type:'ev3'})",fashion:"startBook({cat:'Clothing'})",beauty:"startBook({cat:'FMCG',type:'st4'})",food:"startBook({cat:'FMCG',type:'st8'})",pricing:"goSec('pricing')",models:"go('models')",photographers:"go('photographers')",creators:"go('creators')",studios:"go('locations')",spotlight:"go('spotlight')",gallery:"go('gallery')",login:"go('login')"}; const LINKS=[["","Template default"],["book","Book a shoot"],["creator","Hire a creator"],["events","Event shoots"],["birthday","Birthday shoot booking"],["inaug","Inauguration booking"],["prewed","Pre-wedding booking"],["bizevent","Business event booking"],["fashion","Fashion shoot booking"],["beauty","Beauty packshot booking"],["food","Food & menu booking"],["pricing","Pricing section"],["models","Models page"],["photographers","Photographers page"],["creators","Creators page"],["studios","Studios page"],["spotlight","Spotlight page"],["gallery","Gallery page"],["login","Login / Join page"],["url","Custom web link…"]]; const TPL={ site:{n:"🌐 Website promotion",ph:["Main photo","Collage photo 2","Collage photo 3"],d:{src:"img/m-green.jpg",src2:"img/f-perfume1.jpg",src3:"img/g-bridal.jpg",title:"Product shoots that make your brand sell",sub:"Models, photographers, studios and creators across India, all booked in one place with a clear price.",btn:"Book a shoot"}}, model:{n:"💃 Model promotion",ref:"models",ph:["Photo (empty = profile photo)"],d:{title:"",sub:"",btn:""}}, photographer:{n:"📷 Photographer promotion",ref:"photographers",ph:["Work photo 1","Work photo 2","Work photo 3"],d:{title:"",sub:"",btn:""}}, creator:{n:"🎬 Creator / influencer promotion",ref:"creators",ph:["Photo (empty = profile photo)","Reel cover 1","Reel cover 2"],d:{title:"",sub:"",btn:""}}, prewed:{n:"💍 Pre-wedding shoot",ph:["Arch photo 1","Arch photo 2"],d:{src:"img/g-bridal.jpg",src2:"img/l-haveli.jpg",title:"Your love story, beautifully shot",sub:"Pre-wedding shoots at palaces, beaches and studios, with photographers and creators who make it cinematic.",btn:"Book pre-wedding shoot"}}, birthday:{n:"🎂 Birthday shoot",ph:["Polaroid 1","Polaroid 2","Polaroid 3"],d:{src:"img/f-waffle.jpg",src2:"img/f-canape.jpg",src3:"img/m-pinktop.jpg",title:"Make every birthday unforgettable",sub:"Party candids, cake-smash shoots and family portraits, by a photographer at your venue.",btn:"Book birthday shoot"}}, bizevent:{n:"🏢 Business event",ph:["Big photo","Photo 2","Photo 3"],d:{src:"img/l-courtyard.jpg",src2:"img/l-stage.jpg",src3:"img/l-lounge.jpg",title:"Business event coverage",sub:"Conferences, product launches, award nights and corporate parties, covered by verified pros with fast delivery.",btn:"Book event coverage"}}, resto:{n:"🍽️ Restaurant photos & reels",ph:["Reel cover (phone)","Menu photo","Dish photo","Flat lay","Dessert"],d:{src:"img/f-burger.jpg",src2:"img/f-noodles2.jpg",src3:"img/f-dillfish.jpg",src4:"img/f-salad.jpg",src5:"img/f-waffle.jpg",title:"Make your restaurant go viral",sub:"Mouth-watering menu photos and reels by food creators, with optional influencer promotion and a free BrandShot Spotlight feature.",btn:"Hire a food creator"}}, fashion:{n:"👗 Fashion & catalogue",ph:["Strip photo 1","Strip photo 2","Strip photo 3"],d:{src:"img/m-redkurta.jpg",src2:"img/g-banarasi.jpg",src3:"img/c-jeans.jpg",title:"Catalogue shoots that sell out",sub:"Flat lay, on-model and lifestyle shoots for sarees, kurtis, western wear and denim, ready for every marketplace.",btn:"Book fashion shoot"}}, beauty:{n:"✨ Beauty & skincare",ph:["Hero product","Product 2","Product 3"],d:{src:"img/f-serum.jpg",src2:"img/f-perfume2.jpg",src3:"img/f-lipstick.jpg",title:"Packshots that glow",sub:"Skincare, cosmetics and fragrance shoots: white background, creative props and 360° spins.",btn:"Book beauty shoot"}}, studio:{n:"🏢 Studio rental",ph:["Studio photo","Photo 2","Photo 3"],d:{src:"img/s-studio1.jpg",src2:"img/l-sunlit.jpg",src3:"img/l-daycyc.jpg",title:"Rent a studio by the hour",sub:"Cycloramas, natural-light lofts and heritage sets across India. Rent the space, or let the studio shoot for you.",btn:"Explore studios"}}, photo:{n:"🖼️ Simple photo banner",ph:["Background photo"],d:{src:"img/l-tilecafe.jpg",title:"Your headline here",sub:"Short line about this offer.",btn:"Book a shoot"}}}; const bv=(b,k)=>b[k]!==undefined&&b[k]!==""?b[k]:(TPL[b.tpl]?.d||{})[k]; function bBtn(b,label,def,cls="btn lg"){const L=b.btn||label;if(b.link==="url"&&b.url)return `${L}`;return ``} const minP=()=>Math.min(...DB.photographers.filter(p=>p.status==="approved").map(phCost)); const TONES=[["","Template colours"],["ember","Ember","#16130f","#e2552d"],["royal","Royal","#1b1340","#7a5af0"],["ocean","Ocean","#0f1b2d","#2a9dc8"],["forest","Forest","#0f2a1f","#2a9d8f"],["wine","Wine","#3a0f1f","#c94f7c"],["sunset","Sunset","#5b1f3a","#f4a261"],["gold","Gold","#1d1a12","#d4a017"],["mint","Mint","#e8f6ef","#2a9d8f",1],["blush","Blush","#fff1ec","#e2552d",1],["sky","Sky","#eaf3ff","#3d5a98",1],["lemon","Lemon","#fff8d6","#16130f",1],["mono","Mono","#111","#666"]]; function toneOf(b){if(b.tone==="custom"&&b.t1)return [b.t1,b.t2||b.t1,isLight(b.t1)];const t=TONES.find(x=>x[0]===b.tone&&x[0]);return t?[t[2],t[3],!!t[4]]:null} function isLight(h){h=(h||"#000").replace("#","");if(h.length===3)h=h.split("").map(x=>x+x).join("");const n=parseInt(h,16);return ((n>>16)*299+((n>>8)&255)*587+(n&255)*114)/1000>160} function slideInner(b){const h=slideInner0(b),t=toneOf(b);return t?`
${h}
`:h} function regC(){(DB.ctpl||[]).forEach(c=>{TPL["c_"+c.id]={n:"⭐ "+c.name,ph:[...Array(c.n||1)].map((_,i)=>"Photo "+(i+1)),d:{src:c.src||"img/l-tilecafe.jpg",src2:c.src2||"",src3:c.src3||"",title:c.title,sub:c.sub,btn:c.btn,tone:c.tone||"",t1:c.t1||"",t2:c.t2||""},custom:c}})} function slideInner0(b){const t=b.tpl||"photo",T=(k)=>bv(b,k); const wrap=(cls,bg,txt,vis)=>`
${txt}
${vis}
`; const head=(kick,title,sub,badges)=>`${kick}

${title}

${sub}

${badges?`
${badges.map(x=>`${x}`).join("")}
`:""}`; if(t==="site")return wrap("bt-site",T("src"),head("BrandShot Studio",T("title"),T("sub"),["✓ No booking fee","✓ Instant booking","✓ Photos in 3–5 days"])+bBtn(b,T("btn"),"startBook()"),`
${[T("src"),T("src2"),T("src3")].map((x,i)=>`
`).join("")}
`); if(t==="model"){const m=byId("models",b.ref)||rank(DB.models.filter(x=>x.status==="approved"))[0];if(!m)return "";const ph=b.src||m.photo; return `
★ ${perf(m.id).stars}
${head("💃 Featured model",b.title||m.name,b.sub||m.bio,["📍 "+m.city,m.height,...m.tags.slice(0,2)])}
All-in from ${inr(modelCost(m))}/day
${bBtn(b,"Book "+m.name.split(" ")[0],`startBook({models:['${m.id}']})`)}
`} if(t==="photographer"){const p=byId("photographers",b.ref)||rank(DB.photographers.filter(x=>x.status==="approved"))[0];if(!p)return "";const q=perf(p.id),G=DB.gallery.filter(g=>g.by===p.id&&g.src).map(g=>g.src),W=[b.src||G[0],b.src2||G[1],b.src3||G[2]].filter(Boolean); return wrap("bt-ph",W[0]||p.photo||"",`📷 Featured photographer
${p.photo?``:avatar(p.id,p.g,300,300)}

${b.title||p.name}

📍 ${p.city} · ${p.exp} · ★ ${q.stars} · ${q.on}% on time

${b.sub||p.bio}

${p.tags.slice(0,3).map(x=>`${x}`).join("")}
From ${inr(phCost(p))}/day
`+bBtn(b,"Book "+p.name.split(" ")[0],`startBook({ph:'${p.id}'})`),`
${W.map(x=>`
`).join("")}
`)} if(t==="creator"){const c=byId("creators",b.ref)||rank(DB.creators.filter(x=>x.status==="approved"))[0];if(!c)return "";const ph=b.src||c.photo,R=[b.src2||c.work[0]?.src,b.src3||c.work[1]?.src].filter(Boolean); return wrap("bt-cr",ph,head("🎬 Featured creator",b.title||c.name,b.sub||c.bio,[...(c.promo?.on?["📣 "+c.followers+" followers"]:[]),"📍 "+c.city,...c.niche.slice(0,2)])+`
Reels from ${inr(c.rate.reel)}${c.promo?.on?` · Promo post ${inr(c.promo.price)}`:""}
`+bBtn(b,"Hire "+c.name.split(" ")[0],`startCreator({creator:'${c.id}'})`),`
${R.map((x,i)=>`
▶
`).join("")}
`)} if(t==="prewed")return wrap("bt-pw",T("src"),head("💍 Pre-wedding shoots",T("title"),T("sub"),["Candid & cinematic","Heritage & destination sets","Photos + reels"])+`
Photographers from ${inr(minP())}/day
`+bBtn(b,T("btn"),LACT.prewed),`
♥
`); if(t==="birthday")return wrap("bt-bd",T("src"),head("🎂 Birthday shoots",T("title"),T("sub"),["Kids & adults","Cake smash","Party candids"])+`
Photographers from ${inr(minP())}/day
`+bBtn(b,T("btn"),LACT.birthday),`
${[T("src"),T("src2"),T("src3")].map((x,i)=>`
${["Party time 🎉","Cake moments 🎂","Smiles all round"][i]}
`).join("")}
`); if(t==="bizevent")return wrap("bt-ev",T("src"),head("🏢 Business events",T("title"),T("sub"),["Conferences & launches","Stage & team photos","Highlight reel"])+bBtn(b,T("btn"),LACT.bizevent),`
${[T("src"),T("src2"),T("src3")].map(x=>`
`).join("")}
`); if(t==="resto"){const fc=DB.creators.filter(c=>c.status==="approved"&&c.niche.some(n=>/food|restaurant|caf|baker/i.test(n)));const pk=fc.length?Math.min(...fc.map(c=>3*c.rate.reel+15*c.rate.photo+c.rate.travel)):0;const ph=[1,2,3,4,5].map(i=>T(i===1?"src":"src"+i)); return wrap("bt-rs",ph[0],`🍽️ Restaurants, cafés & cloud kitchens

${T("title")}

${T("sub")}

  • 📸 Menu & dish photos for Zomato, Swiggy & Google
  • 🎬 Reels & YouTube Shorts by food creators
  • 📣 Optional influencer post on their page
  • ⭐ Free feature on BrandShot Spotlight
Starter pack: 3 reels + 15 photosfrom ${inr(pk)}
${bBtn(b,T("btn"),"startCreator()")}
`, `
Menu photo
Flat lay
▶
@yourrestaurantNew on the menu 🔥
♥💬↗
Dish styling
Desserts
`)} if(t==="fashion"){const g=Math.min(...DB.studios.filter(s=>s.status==="approved"&&s.shoots&&s.perGarment).map(s=>s.perGarment)); return wrap("bt-fa",T("src"),head("👗 Fashion & catalogue",T("title"),T("sub"),["Flat lay","On-model","Lifestyle"])+`
Studio packages from ${inr(g)}/garment
`+bBtn(b,T("btn"),LACT.fashion),`
NEW SEASON${[T("src"),T("src2"),T("src3")].map((x,i)=>`
`).join("")}
`)} if(t==="beauty"){const pp=Math.min(...DB.studios.filter(s=>s.status==="approved"&&s.shoots&&s.perProduct).map(s=>s.perProduct)); return wrap("bt-be",T("src"),head("✨ Beauty & skincare",T("title"),T("sub"),["White background","Creative props","360° spin"])+`
From ${inr(pp)}/product
`+bBtn(b,T("btn"),LACT.beauty),`
`)} if(t==="studio"){const S=DB.studios.filter(s=>s.status==="approved"),top=rank(S)[0],mh=Math.min(...S.map(s=>s.hour)); return wrap("bt-st",T("src"),head("🏢 Studios & sets",T("title"),T("sub"),["Cycloramas","Natural light","Heritage sets"])+`
From ${inr(mh)}/hour
`+bBtn(b,T("btn"),LACT.studios),`
${top?`
${top.name}📍 ${top.city} · ${inr(top.hour)}/hr · ★ ${perf(top.id).stars}
`:""}
`)} if(TPL[t]?.custom){const c=TPL[t].custom,P=[T("src"),T("src2"),T("src3")].slice(0,c.n||1).filter(Boolean),txt=`${c.kick?`${c.kick}`:""}

${T("title")}

${T("sub")}

${T("btn")?bBtn(b,T("btn"),"startBook()"):""}`; if(c.layout==="full")return wrap("bt-cf",P[0]||"",txt,""); return wrap("bt-cu",P[0]||"",txt,`
${P.map((x,i)=>`
`).join("")}
`)} return `

${T("title")}

${T("sub")}

${T("btn")?bBtn(b,T("btn"),"startBook()","btn"):""}
`} /* admin */ let BPREV=null; function bnSet(i,k,v){DB.banners[i][k]=v;save();if(["on","tpl","ref","link","tone","t1","t2"].includes(k)||k.startsWith("src"))render();else toast("Saved ✓ (live)")} function bnImgK(i,k,files){readFiles([files[0]],src=>{DB.banners[i][k]=src;save();render()})} function bnAdd(t){DB.banners.push({on:true,tpl:t,link:"",...structuredClone(TPL[t].d)});save();toast("Added to the slider, now live");render()} function bnMove(i,d){const j=i+d;if(j<0||j>=DB.banners.length)return;[DB.banners[i],DB.banners[j]]=[DB.banners[j],DB.banners[i]];save();render()} function bnDel(i){DB.banners.splice(i,1);save();toast("Slide removed");render()} const bannerAdmin=()=>{const imgs=allImgs();const sel=(i,k,v)=>`
`; return `

🖼️ Website banners

Pick a template, add your photos, change the text and choose where the button goes. Every change goes live on the website straight away. 5–7 slides works best.

Slides on the website (${DB.banners.filter(b=>b.on).length} showing)

${DB.banners.map((b,i)=>{const T=TPL[b.tpl]||TPL.photo;return `
${i+1}${T.n}${bv(b,"title")||""}${b.on?"Live":"Hidden"}
${slideInner(b)}
${T.ref?`
`:"
"}
${toneUI(b,i)}
${T.ph.map((l,n)=>{const k=n===0?"src":"src"+(n+1);return `
${l}${sel(i,k,b[k]||bv(b,k))}
`}).join("")}
${T.ref?'

Leave text empty to use their name, bio and a “Book” button automatically.

':""}
${b.link==="url"?`
`:"
"}
`}).join("")}
${ctAdmin()}

📚 Template library

Saved designs. Tap “Use this” to add one to the slider, then edit its photos and text above.

${Object.entries(TPL).map(([k,v])=>`
${slideInner({tpl:k,...v.d})}
${v.n}
`).join("")}
`}; function toneUI(b,i,fn){fn=fn||((k,v)=>`bnSet(${i},'${k}',${v})`);const cur=b.tone||""; return `
${TONES.map(t=>t[0]?``:``).join("")} Custom:
`} /* custom templates */ let CT=null; const ctNew=()=>({id:"t"+Date.now(),name:"",kick:"",layout:"split",n:2,src:"img/m-green.jpg",src2:"img/f-perfume1.jpg",src3:"img/g-bridal.jpg",title:"Your headline here",sub:"One short line about the offer.",btn:"Book a shoot",tone:"ember",t1:"",t2:""}); function ctSet(k,v){CT[k]=v;render()} function ctImg(k,files){readFiles([files[0]],src=>{CT[k]=src;render()})} function ctSave(){if(!CT.name.trim())return toast("Give the template a name");DB.ctpl=DB.ctpl||[];const i=DB.ctpl.findIndex(x=>x.id===CT.id);i>-1?DB.ctpl[i]=CT:DB.ctpl.push(CT);regC();save();toast("Template saved to your library");CT=null;render()} function ctDel(id){if(!confirm("Delete this template? Slides using it will switch to the simple photo banner."))return;DB.ctpl=(DB.ctpl||[]).filter(x=>x.id!==id);delete TPL["c_"+id];DB.banners.forEach(b=>{if(b.tpl==="c_"+id)b.tpl="photo"});save();render()} function ctAdmin(){const imgs=allImgs(),pick=(k)=>`
`; const list=(DB.ctpl||[]).map(c=>`
⭐ ${c.name}
${{split:"Text + photos",collage:"Text + photo collage",full:"Full photo"}[c.layout]} · ${c.n} photo(s)
`).join(""); if(!CT)return `

⭐ Your custom templates

Design your own banner layout with your colours, photos and text. It is saved to the template library and can be used again any time.

${list?`
${list}
`:""}
`; const pv={tpl:"_ct",title:CT.title,sub:CT.sub,btn:CT.btn,src:CT.src,src2:CT.src2,src3:CT.src3,tone:CT.tone,t1:CT.t1,t2:CT.t2};TPL._ct={n:"",ph:[],d:{},custom:CT};const html=slideInner(pv);delete TPL._ct; return `

${(DB.ctpl||[]).some(x=>x.id===CT.id)?"Edit":"New"} custom template

${html}
${toneUI(CT,0,(k,v)=>`ctSet('${k}',${v})`)}
${["src","src2","src3"].slice(0,CT.layout==="full"?1:CT.n).map((k,n)=>`
Photo ${n+1}${pick(k)}
`).join("")}
`} function bannerHTML(){const B=(DB.banners||[]).filter(b=>b.on);if(!B.length)return ""; return `
${B.map(b=>`
${slideInner(b)}
`).join("")}
${B.length>1?`
${B.map((_,i)=>``).join("")}
`:""}
`} function slideTo(i){const el=document.getElementById("bsl");if(!el||!el.querySelectorAll)return;const n=el.querySelectorAll(".bslide").length;if(!n)return;BI=((i%n)+n)%n;el.querySelector(".btrack").style.transform=`translateX(-${BI*100/n}%)`;el.querySelectorAll(".bdots span").forEach((d,j)=>d.classList.toggle("on",j===BI))} function slideBy(d){slideTo(BI+d)} try{setInterval(()=>{if(VIEW==="home"&&!document.body.classList.contains("mopen"))slideBy(1)},4500)}catch(e){} /* ================= WEBSITE SETTINGS (CMS) ================= */ const SITE_DEF={ "brand.phone":"+91 98765 43210","brand.email":"hello@brandshotstudio.com","brand.addr":"Andheri West, Mumbai","brand.tagline":"Professional product photoshoots for fashion, beauty, food and everyday brands.","brand.cities":"Mumbai · Surat · Ahmedabad · Jaipur · Delhi · Bengaluru · Hyderabad · Pune · Goa · Kolkata · Udaipur · Mysuru", "hero.tag":"Product photoshoots across India","hero.title":"Professional product photoshoots,","hero.em":"booked in minutes.","hero.lead":"Fashion, beauty, food and everyday products, shot by verified photographers, models and studios. See open dates and the full price, then book instantly.","hero.btn1":"Book your shoot","hero.btn2":"See pricing","hero.ticks":"No booking fee, Instant confirmation, Photos in 3–5 days", "hero.img1":"img/m-green.jpg","hero.img2":"img/f-perfume1.jpg","hero.img3":"img/m-bluelehenga.jpg","hero.img4":"img/f-serum.jpg","hero.img5":"img/g-banarasi.jpg", "mbar.label":"Sized and styled for","mbar.items":"Amazon, Flipkart, Myntra, Meesho, Ajio, Nykaa, Instagram, Your website", "cats.tag":"What we shoot","cats.title":"Photoshoots for every product","cats.sub":"From silk sarees to skincare serums, we have the right team, set and style for it.", "cats.1.t":"Sarees & Ethnic Wear","cats.1.img":"img/g-redsaree.jpg","cats.2.t":"Kurtis & Kurtas","cats.2.img":"img/m-redkurta.jpg","cats.3.t":"Bridal & Lehengas","cats.3.img":"img/m-lehenga.jpg","cats.4.t":"Western & Partywear","cats.4.img":"img/m-meher.jpg", "cats.5.t":"Beauty & Skincare","cats.5.img":"img/f-serum.jpg","cats.6.t":"Perfumes & Cosmetics","cats.6.img":"img/f-lipstick.jpg","cats.7.t":"Food, Snacks & Beverages","cats.7.img":"img/f-noodles2.jpg","cats.8.t":"Restaurants & Menus","cats.8.img":"img/f-burger.jpg", "more.tag":"More than product shoots","more.title":"Celebrate, promote, go viral","more.sub":"Birthday, wedding and event photography, plus reels and photos for shops, hotels and restaurants by creators across India.", "more.1.t":"Birthday shoots","more.1.d":"Photographer at your party","more.1.img":"img/f-waffle.jpg","more.2.t":"Wedding & pre-wedding","more.2.d":"Candid & traditional","more.2.img":"img/g-bridal.jpg","more.3.t":"Event coverage","more.3.d":"Parties, launches, corporate","more.3.img":"img/l-courtyard.jpg","more.4.t":"Reels for shops & hotels","more.4.d":"Creators + influencer promotion","more.4.img":"img/l-tilecafe.jpg", "band.1.n":"⚡","band.1.l":"Instant booking","band.2.n":"₹0","band.2.l":"Booking fee","band.3.n":"3–5 days","band.3.l":"Photo delivery","band.4.n":"12 months","band.4.l":"Advance booking", "how.tag":"How it works","how.title":"Three steps to sales-ready photos","how.1.t":"Build your shoot","how.1.d":"Choose a studio package, or pick your own photographer, location and models. Prices are shown upfront.","how.2.t":"Pick a free date","how.2.d":"See only the dates your whole team is free. Your booking is confirmed instantly.","how.3.t":"Get edited photos","how.3.d":"Shoot day handled end-to-end. Retouched, marketplace-ready images in 3–5 days.", "price.tag":"Pricing","price.title":"Clear pricing, no booking fee","price.sub":"You pay only for your shoot team, plus GST. Every rate card is public.", "cities.title":"Shoot across India", "exp.tag":"The BrandShot experience","exp.title":"You bring the product. We handle everything else.","exp.sub":"No running around for models, photographers or studios. One booking, one team, and photos that make your product sell.", "exp.1.t":"Styled to sell","exp.1.d":"Every shot is lit, styled and retouched for marketplaces and Instagram.","exp.2.t":"Verified team","exp.2.d":"Every model, photographer and studio is reviewed and approved before going live.","exp.3.t":"No surprises","exp.3.d":"See the full cost before you book. Any extras are shown line by line.","exp.4.t":"Instant booking","exp.4.d":"Pick a free date and you're confirmed. No back-and-forth calls.", "work.title":"Recent work","work.1.img":"img/g-bridal.jpg","work.2.img":"img/f-perfume2.jpg","work.3.img":"img/m-sana.jpg","work.4.img":"img/f-dillfish.jpg","work.5.img":"img/g-beach.jpg","work.6.img":"img/f-lipstick.jpg", "faq.title":"Questions brands ask", "faq.1.q":"How long does a shoot take?","faq.1.a":"Most catalogue shoots finish in a single day. Larger campaigns can be booked for several days in a row.","faq.2.q":"Is there a booking fee?","faq.2.a":"No. You pay only for your shoot team (studio, photographer and models) plus GST. You can see the full cost before you book.","faq.3.q":"How fast do I get my photos?","faq.3.a":"Edited images are usually delivered in 3–5 working days, sized for marketplaces and social media.","faq.4.q":"Can I bring my own model or location?","faq.4.a":"Yes. Shoot at your own shop or godown, pick a studio's preferred models, or choose from BrandShot's verified models.","faq.5.q":"What if the shoot needs more work on the day?","faq.5.a":"If you add garments, overtime or props on the day, the team adds it as an extra, and you see it clearly in your final bill.","faq.6.q":"How do I pay?","faq.6.a":"Pay 30% advance to lock your date and the balance after delivery.", "cta.title":"Ready for photos that sell?","cta.sub":"Pick your team, choose a free date, and you're booked.", "pg.models.t":"Verified models for your shoot","pg.models.s":"Every rate card includes fee, makeup, travel and food, so there are no hidden costs.", "pg.photographers.t":"Pro photographers, transparent rates","pg.photographers.s":"See reference work, full expenses and what each photographer needs from you.", "pg.locations.t":"Studios & sets to shoot at","pg.locations.s":"BrandShot-owned studios plus partner sets across India. You can also shoot at your own place.", "pg.creators.t":"Reels & photos for shops, hotels and events","pg.creators.s":"Hire creators across India for branding reels, photos or both. Add influencer promotion on their page if you want more reach, and get featured free on BrandShot Spotlight.", "about.title":"We make professional shoots simple for every brand","about.sub":"BrandShot Studio connects brands, shops and families with verified models, photographers, creators and studios across India, with clear prices and instant booking.","about.img1":"img/m-green.jpg","about.img2":"img/f-perfume1.jpg", "about.storyT":"Built for India's growing brands","about.story":"Getting a good shoot done used to mean calling around for a photographer, a model and a studio, then waiting days to hear back on dates and prices.\n\nBrandShot Studio brings everyone onto one platform. You see real portfolios, ratings and rate cards, pick a date when your whole team is free, and get confirmed instantly. From a saree catalogue to a café reel to a wedding, we make every shoot easy.","about.mission":"Help every business look its best online, at a fair price.","about.missionD":"We help small and growing brands get the same quality of photos and reels as big companies, and give talented models, photographers, creators and studios steady work.", "contact.title":"We'd love to hear from you","contact.sub":"Questions about a shoot, partnership or your booking? Send us a message or reach us directly.","contact.hours":"Mon to Sat, 10 am – 7 pm","contact.wa":"","khata.url":"","khata.label":"Make bill on Khata Express","khata.note":"Make GST bills on Khata Express, up to 10 bills free. Then attach the bill here.","print.url":"","print.label":"Order prints & frames","print.note":"Turn your favourite shots into prints, canvases and frames from our printing partner.", "pg.spotlight.t":"Vendors we're featuring now","pg.spotlight.s":"Every vendor who shoots with a BrandShot creator gets featured free here and on BrandShot's Instagram."}; const S=k=>{const v=DB.site&&DB.site[k];return v!==undefined&&v!==""?v:SITE_DEF[k]}; const SITE_GROUPS=[["brand","🏷️ Brand & contact (footer)"],["hero","⭐ Top section"],["mbar","🛒 Marketplace strip"],["cats","🧩 Product categories"],["more","🎉 Events & creators section"],["band","📊 Highlight strip"],["how","🪜 How it works"],["price","💰 Pricing heading"],["cities","📍 Cities heading"],["exp","✨ Experience section"],["work","🖼️ Recent work photos"],["faq","❓ FAQs"],["cta","📣 Final banner"],["about","ℹ️ About us page"],["contact","📞 Contact page"],["print","🖼️ Prints & frames link"],["khata","🧾 Vendor billing app link"],["pg","📄 Page headings"]]; const siteLabel=k=>{const p=k.split(".").slice(1),m={storyT:"story heading",story:"story text",missionD:"mission text",mission:"mission line",hours:"working hours",wa:"WhatsApp number (empty = same as phone)",title:"title",t:"title",d:"description",img:"image",q:"question",a:"answer",n:"number",l:"label",s:"subtitle",tag:"small label",sub:"subtitle",em:"title (coloured part)",lead:"intro text",btn1:"main button",btn2:"second button",ticks:"tick points (comma separated)",items:"names (comma separated)"}; return p.map(x=>/^\d+$/.test(x)?"#"+x:(m[x]||x.replace(/img(\d)/,"image $1"))).join(" · ")}; function setSite(k,v){DB.site=DB.site||{};DB.site[k]=v;save();toast("Saved ✓ (live on the website)")} function siteImg(k,files){readFiles([files[0]],src=>{setSite(k,src);render()})} function resetGroup(g){Object.keys(SITE_DEF).filter(k=>k.startsWith(g+".")).forEach(k=>delete DB.site[k]);save();toast("Group reset to default");render()} const allImgs=()=>[...new Set([...Object.values(SITE_DEF).filter(v=>typeof v==="string"&&v.startsWith("img/")),...DB.studios.map(s=>s.photo),...DB.models.map(m=>m.photo),...DB.creators.flatMap(c=>[c.photo,...c.work.map(w=>w.src)]),...DB.gallery.map(g=>g.src)].filter(x=>x&&x.startsWith("img/")))]; const imgPick=(val,onpick,onup)=>`
`; const siteAdmin=()=>`

⚙️ Website settings

Change any text or photo on the public website. Changes go live as soon as you leave a field. Open a section to edit it.

${SITE_GROUPS.map(([g,label])=>{const keys=Object.keys(SITE_DEF).filter(k=>k.startsWith(g+"."));return `
${label}${keys.length} fields
${keys.map(k=>{const v=S(k);return k.includes("img")?`
${imgPick(v,`setSite('${k}',this.value);render()`,`siteImg('${k}',this.files)`)}
`:`
${String(SITE_DEF[k]).length>70?``:``}
`}).join("")}
`}).join("")}`; /* ---- manage listings ---- */ const LF={ models:[["name","Name"],["photo","Photo","img"],["city","City"],["g","Gender","sel",[["f","Female"],["m","Male"]]],["age","Age","num"],["height","Height"],["size","Size"],["exp","Experience"],["tags","Specialities","tags"],["bio","Bio","area"],["rate.day","Full day fee ₹","num"],["rate.half","Half day fee ₹","num"],["rate.hour","Hourly rate ₹ (0 = not offered)","num"],["rate.makeup","Hair & makeup ₹","num"],["rate.travel","Travel ₹","num"],["rate.food","Food ₹","num"],["rate.other","Stay / other ₹","num"],["rating","Starting rating (1–5)","num"]], photographers:[["name","Name"],["photo","Photo","img"],["city","City"],["g","Gender","sel",[["m","Male"],["f","Female"]]],["exp","Experience"],["tags","Specialities","tags"],["bio","Bio & gear","area"],["rate.day","Day fee ₹","num"],["rate.assistant","Assistant ₹","num"],["rate.equipment","Equipment ₹","num"],["rate.travel","Travel ₹","num"],["rate.perImg","Editing per image ₹","num"],["req","Requirements from party","area"],["rating","Starting rating (1–5)","num"]], creators:[["name","Name"],["photo","Photo","img"],["city","City"],["g","Gender","sel",[["f","Female"],["m","Male"]]],["exp","Experience"],["niche","Niches","tags"],["bio","Bio","area"],["followers","Followers (e.g. 85K)"],["rate.reel","Per reel ₹","num"],["rate.photo","Per photo ₹","num"],["rate.travel","Travel per day ₹","num"],["rate.hour","Hourly rate ₹ (0 = not offered)","num"],["promo.on","Offers influencer promotion","bool"],["promo.price","Promotion price per post ₹","num"],["rating","Starting rating (1–5)","num"]], studios:[["name","Name"],["photo","Photo","img"],["city","City"],["area","Area / address"],["size","Size"],["tags","Amenities","tags"],["owner","Owner","owner"],["hour","Rent per hour ₹","num"],["day","Rent per day ₹","num"],["shoots","Also does photoshoots","bool"],["perGarment","Shoot price per garment ₹","num"],["perProduct","Shoot price per product ₹","num"],["rating","Starting rating (1–5)","num"]]}; const LNAME={models:["💃","Models","model"],photographers:["📷","Photographers","photographer"],creators:["🎬","Creators & influencers","creator"],studios:["🏢","Studios & vendors","studio"]}; let LTAB="models"; const getP=(o,p)=>p.split(".").reduce((a,k)=>a?.[k],o); function setP(o,p,v){const ks=p.split("."),l=ks.pop();let t=o;ks.forEach(k=>t=t[k]=t[k]||{});t[l]=v} function lSet(col,id,path,type,v){const o=byId(col,id);setP(o,path,type==="num"?(+v||0):type==="tags"?v.split(",").map(x=>x.trim()).filter(Boolean):type==="bool"?!!v:v);save();toast("Saved ✓")} function lImg(col,id,files){readFiles([files[0]],src=>{byId(col,id).photo=src;save();editL(col,id)})} function editL(col,id){const o=byId(col,id);openM(`
${LNAME[col][1]}

Edit ${o.name}

${LF[col].map(([p,l,t,opts])=>{const v=getP(o,p);const on=`lSet('${col}','${id}','${p}','${t||"text"}',${t==="bool"?"this.checked":"this.value"})`; if(t==="img")return `
${imgPick(v,`byId('${col}','${id}').photo=this.value;save();editL('${col}','${id}')`,`lImg('${col}','${id}',this.files)`)}
`; if(t==="bool")return `
`; if(t==="sel")return `
`; if(t==="owner")return `
`; if(t==="area")return `
`; return `
`}).join("")}
`)} function addL(col){const id=col[0]+Date.now(),base={id,name:"New "+LNAME[col][2],photo:"",city:"",status:"approved",rating:4.5,slots:nextDays(365)}; const D0={models:{g:"f",age:22,height:"5'6\"",size:"S",exp:"New",tags:[],bio:"",shoots:0,rate:{day:5000,half:3000,makeup:1000,travel:500,food:400,other:0}}, photographers:{g:"m",exp:"New",tags:[],bio:"",shoots:0,rate:{day:8000,perImg:80,assistant:1000,equipment:1500,travel:800},req:""}, creators:{g:"f",exp:"New",niche:[],bio:"",shoots:0,followers:"",rate:{reel:4000,photo:200,travel:800},promo:{on:false,price:0},work:[]}, studios:{owner:"brandshot",area:"",size:"",tags:[],hour:800,day:6000,shoots:false,perGarment:0,perProduct:0,pref:[]}}; DB[col].push({...base,...structuredClone(D0[col])});save();render();editL(col,id)} function delL(col,id){byId(col,id).status="removed";save();toast("Removed from the website");render()} function restoreL(col,id){byId(col,id).status="approved";save();toast("Restored");render()} const listAdmin=()=>{const L=DB[LTAB];return `

👥 Manage listings

Add, edit or remove models, photographers, creators/influencers and studios. Removed listings disappear from the website. Their past bookings stay safe.

${Object.entries(LNAME).map(([k,[i,l]])=>``).join("")}
${L.map(o=>`
${o.photo?``:avatar(o.id,o.g||"f",300,300)}
${o.name}
${o.city||"-"} · ${stChip(o.status)}
${o.status==="removed"?``:``}
`).join("")}
`}; function footerHTML(){return `

${S("brand.tagline")}

📞 ${S("brand.phone")}
✉️ ${S("brand.email")}
📍 ${S("brand.addr")}

© 2026 BrandShot Studio${S("brand.cities")}
`} /* ================= ABOUT & CONTACT ================= */ V.about=()=>`
About us

${S("about.title")}

${S("about.sub")}

${[S("about.img1"),S("about.img2"),"img/f-perfume2.jpg","img/l-sunlit.jpg","img/m-redkurta.jpg"].map((x,i)=>`
`).join("")}
Our story

${S("about.storyT")}

${S("about.story")}

Our mission

${S("about.mission")}

${S("about.missionD")}

What we do

One platform for every shoot

${[["📸","Product shoots","Clothing, beauty, food and everyday products, ready for every marketplace.","startBook()"],["🎉","Event shoots","Birthdays, weddings, pre-weddings, inaugurations and business events.","startBook({cat:'Events'})"],["🎬","Creators & reels","Reels and influencer promotion for shops, cafés, hotels and brands.","startCreator()"],["🏢","Studios & sets","Studios across India, to rent or to shoot with their own team.","go('locations')"]].map(([i,t,d,f])=>`
${i}

${t}

${d}

`).join("")}
Why BrandShot

What makes us different

${[["🛡️","Verified partners","Every model, photographer, creator and studio is reviewed before going live."],["💰","Clear pricing","Public rate cards and a full bill before you book, with no booking fee."],["⚡","Instant booking","Pick a date when your whole team is free. Confirmed in seconds."],["🏆","Ranked by performance","Ratings, punctuality and delivery speed decide who's recommended."],["🔁","Backup if plans change","If someone can't make it, we allot the best available option."],["🤝","Fair for partners","Partners set their own rates and free dates, and get paid for every extra."]].map(([i,t,d])=>`
${i}

${t}

${d}

`).join("")}
Partner with us

Grow your work with BrandShot

Models, photographers, creators and studio owners: list your profile, set your rates and get booked by brands across India.

`; const waNum=()=>String(S("contact.wa")||S("brand.phone")).replace(/\D/g,"").replace(/^(?!91)(\d{10})$/,"91$1"); let CQ={type:"Brand / business"}; V.contact=()=>`
Contact us

${S("contact.title")}

${S("contact.sub")}

Send us a message

${["Brand / business","Model","Photographer","Creator","Studio owner","Other"].map(x=>``).join("")}

Reach us directly

${[["📞","Call us",S("brand.phone"),`tel:${S("brand.phone").replace(/\s/g,"")}`],["💬","WhatsApp","+"+waNum(),`https://wa.me/${waNum()}`],["✉️","Email",S("brand.email"),`mailto:${S("brand.email")}`],["📍","Office",S("brand.addr"),""],["🕒","Working hours",S("contact.hours"),""]].map(([i,t,v,h])=>`
${i}
${t}
${h?`${v}`:v}
`).join("")}

Ready to book?

Skip the wait: book a shoot or hire a creator instantly online.

`; function sendCQ(){const n=$("cqn").value.trim(),p=$("cqp").value.trim(),m=$("cqm").value.trim(),e=$("cqerr"); if(!n||!p||!m){e.textContent="Please fill in your name, phone and message";return}if(p.replace(/\D/g,"").length<10){e.textContent="Please enter a valid phone number";return} (DB.enq=DB.enq||[]).unshift({id:"q"+Date.now(),type:CQ.type,name:n,phone:p,email:$("cqe").value.trim(),city:$("cqc").value.trim(),msg:m,at:Date.now(),status:"New"});save(); openM(`
✅

Thanks, ${n.split(" ")[0]}!

We've received your message and will reply on ${p}, usually within a few hours on working days.

`)} function enqSet(id,st){DB.enq.find(x=>x.id===id).status=st;save();render()} function enqDel(id){DB.enq=DB.enq.filter(x=>x.id!==id);save();render()} const enqAdmin=()=>{const L=DB.enq||[];return `

📨 Enquiries

Messages sent from the Contact us page. Reply on WhatsApp or by phone, then mark them as replied.

${L.map(q=>`
${q.name[0].toUpperCase()}
${q.name} ${q.type} ${stChip(q.status==="New"?"Pending":"Completed").replace(/Pending|Completed/,q.status)}
📞 ${q.phone}${q.email?" · ✉️ "+q.email:""}${q.city?" · 📍 "+q.city:""} · ${fmtT(q.at)}

${q.msg}

💬 WhatsApp${q.status==="New"?``:``}
`).join("")||'
No enquiries yet
'}
`}; V.dash=()=>{if(!ME){LMODE="login";return V.login()} const d=D[ME.role];if(!DTAB||!d[DTAB])DTAB=d.tabs[0][0]; const ref=ME.ref&&(byId("models",ME.ref)||byId("photographers",ME.ref)); const av=ref?.photo?``:avatar(ME.ref||ME.id,ref?.g||"m",300,300); return `
${d[DTAB]()}
`}; render();